﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Domain.审计字段;

namespace PersonnelSystemManagement.系统管理
{
    /// <summary>
    /// 菜单表
    /// </summary>
    public class Menus : AuditableEntityBase
    {
        /// <summary>
        /// 主键 ID
        /// </summary>
        [Key]
        public int id { get; set; }

        /// <summary>
        /// 菜单显示名称
        /// </summary>
        [StringLength(200, ErrorMessage = "菜单显示名称长度不能超过 200 个字符")]
        public string? MenuName { get; set; }

        /// <summary>
        /// 父菜单 ID，0 表示顶级菜单
        /// </summary>
        public int? ParentID { get; set; }

        /// <summary>
        /// 菜单对应的访问路径
        /// </summary>
        [StringLength(200, ErrorMessage = "菜单对应的访问路径长度不能超过 200 个字符")]
        public string? Url { get; set; }

        /// <summary>
        /// 排序序号
        /// </summary>
        public int? SortOrder { get; set; }

        /// <summary>
        /// 是否在界面显示：1 是，0 否
        /// </summary>
        public int? IsVisible { get; set; }
    }
}
